package com.entity;

import com.group.ProductionOrderAddGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.sql.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ProductionReceive {
    private int id;

    //  领料单号
    private String pmid;
    //  原料名称
    @NotBlank(groups = ProductionOrderAddGroup.class, message = "产品名称不能为空")
    private String mname;
    //  原料单位
    @NotBlank(groups = ProductionOrderAddGroup.class, message = "产品单位不能为空")
    private String munit;
    //  原料数量
    @NotBlank(groups = ProductionOrderAddGroup.class, message = "产品数量不能为空")
    @Pattern(groups = ProductionOrderAddGroup.class, regexp = "^[1-9]\\d*$", message = "邮箱格式错误")
    private String mnum;
    //  领料日期
    @NotNull(groups = ProductionOrderAddGroup.class, message = "日期不能为空")
    private Date mtime;
    //  领料员工
    @NotNull(groups = ProductionOrderAddGroup.class, message = "领料员工不能为空")
    private String mperson;
    //  领料状态
    private String mstate;
    //  申请状态
    private String astate;
    //  原料数量
    private String myield;
}
